package com.aiwhose.aiwhosesecurity.utils;


import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;

import java.util.HashMap;

public class SMSMonyunUtil {
    public SMSMonyunUtil() {
    }

    public String sendMessage(String phoneNumber, String content) {
        String url = "http://api01.monyun.cn:7901/sms/v2/std/single_send";
        HashMap<String, Object> paramMap = new HashMap<>();
        paramMap.put("apikey", "a67c63d031a39bf4271c2288a3613e0c");
        paramMap.put("mobile", phoneNumber.trim());
        paramMap.put("content", content);
        paramMap.put("svrtype", "SMS001");
        paramMap.put("exno", "0006");
        paramMap.put("custid", "b3d0a2783d31b21b8573");
        paramMap.put("exdata", "exdata000002");
        String result = HttpUtil.post(url, JSONUtil.toJsonStr(paramMap));
        return result;
    }

}
